//
//  LLMyOrderListViewController.m
//  LoveLove
//
//  Created by wkf on 2019/3/28.
//  Copyright © 2019 wkf. All rights reserved.
//

#import "LLMyOrderListViewController.h"
#import "LLMyOrderTableViewCell.h"

@interface LLMyOrderListViewController ()<LLMyOrderTableViewCellDelete>

@end

@implementation LLMyOrderListViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = LLColorRGB(243);
    // Do any additional setup after loading the view.
}

#pragma mark - 显示视图操作方法
- (void)configTableView {
    self.needRefresh = NO;
    [super configTableView];
    self.tableView.backgroundColor = LLColorRGB(243);
    self.tableView.mj_h = LLScreenHeight-self.navH-40;
    [self.tableView registerCellByClassName:@"LLMyOrderTableViewCell"];
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}

#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    if (self.models.count) {
        [self hideNoDataView];
        return self.models.count;
    }
    [self showNoDataView:@"矢量智能对象" title:@"还没有相关的订单呢"];
    return 0;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    LLMyOrderTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"LLMyOrderTableViewCell"];
    cell.accessoryType = UITableViewCellAccessoryNone;
    cell.selectionStyle = UITableViewCellSelectionStyleNone;//无高亮选中
    cell.backgroundColor = [UIColor whiteColor];
    cell.delegate = self;
    cell.backgroundColor = LLColorRGB(243);
    return cell;
}

#pragma mark - UITableViewDelegate
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 242;
}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
    return 0.0000001;
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
    return 0.0000001;
}

- (nullable UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
    return nil;
}

- (nullable UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
    return nil;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
}

- (void)didSelectButton:(LLMyOrderTableViewCell *)cell didClickItem:(NSInteger)item{
    //店铺
    if (item == 0) {
        
    } else {
        
    }
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
